package com.jsb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsb.mapper.SecretlyMapper;
import com.jsb.model.Secretly;
import com.jsb.model.SecretlyExample;

@Service
public class SecretlyService{
	
	@Resource
	private SecretlyMapper secretlyMapper;
	
	public void addSecretly(Secretly secretly) {
		secretlyMapper.insertSelective(secretly);
	}
	
	public void delSecretlyByUuid(String uuid) {
		secretlyMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateSecretly(Secretly secretly) {
		secretlyMapper.updateByPrimaryKeySelective(secretly);
	}
	
	public void updateSecretlyByExample(Secretly secretly,SecretlyExample secretlyExample){
	    secretlyMapper.updateByExampleSelective(secretly,secretlyExample);
	}
	
	public Secretly getSecretlyByUuid(String uuid) {
		return secretlyMapper.selectByPrimaryKey(uuid);
	}
	
	public List<Secretly> getPageSecretly(SecretlyExample secretlyExample) {
		return secretlyMapper.selectPage(secretlyExample);
	}
	
	public int countSecretly(SecretlyExample secretlyExample) {
		return secretlyMapper.countByExample(secretlyExample);
	}
	
	public List<Secretly> selectByExample(SecretlyExample example){
	    return secretlyMapper.selectByExample(example);
	}
}
